<!DOCTYPE html>
<html>
  <body>
    <script>
       const ipcRenderer = require('electron').ipcRenderer;

        console.log(ipcRenderer.sendSync('asynchronous-message', '发送同步消息')) // prints "pong"

        ipcRenderer.on('asynchronous-reply',(event,arg)=>{
            alert('ok');
            console.log(arg);
        });

        ipcRenderer.send("asynchronous-message",'子进程发送非同步消息');
         alert("子进程加载");
    </script>
    测试进程之间进行通信
  </body>
</html>